using UnityEngine;

namespace SpriteEffectSystem
{
    /// <summary>
    /// 特效播放参数
    /// </summary>
    public record EffectPlayParam
    {
        /// <summary>
        /// 播放位置，若设置了 AttachTarget 参数，表示局部坐标，否则表示世界坐标
        /// </summary>
        public Vector3 Position = Vector3.zero;

        /// <summary>
        /// 播放旋转角度，若设置了 AttachTarget 参数，表示局部坐标，否则表示世界坐标
        /// </summary>
        public Quaternion Rotation = Quaternion.identity;

        /// <summary>
        /// 尺寸
        /// </summary>
        public Vector3 Scale = Vector3.one;

        /// <summary>
        /// 附着目标
        /// </summary>
        public Transform AttachTarget = null;

        /// <summary>
        /// 材质，若为空则使用 Controller 上的默认材质
        /// </summary>
        public Material Material = null;

        /// <summary>
        /// 是否循环播放动画，如果是循环播放，请记得手动回收动画资源
        /// </summary>
        public bool Loop = false;

        public float Speed = 1f;
        public Color? Color = null;
        public bool? FilpX = null;
        public bool? FilpY = null;
        public int? SortingLayerId = null;
        public int? OrderInLayer = null;
        public uint? RenderLayerMask = null;
        public int? Layer = null;
    }
}